<?php

class ClientFactory {

	static public function createInstance($name) {
		if ($name == 'riche' ) {
			if ( rand( 1, 2) == 2) {
				return new Client( 'Gates', 'Bill');
			} else  {
				return new Client( 'Buffet', 'Warren');
			}
		}
		else {
			return new Client ('Pauvre', 'Garcon');
		}
	}
}
?>